a_j.values = c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109)
a_j.count_bases = c(0,735304865,225174771,61032622,18756656,7664793,4108314,2619989,1837120,1369568,1053472,831520,673150,552372,460145,390201,332878,286621,251510,220848,195131,173147,154921,138829,125210,112740,101395,91090,82219,74488,66525,59566,52955,46559,40591,35826,31210,26863,22728,19155,16083,13313,11560,9937,8431,7362,5937,5206,4452,3555,3153,2810,2509,2161,1926,1559,1455,1311,1285,1250,1213,1140,1158,1056,1088,996,893,956,1008,1030,1130,1056,971,900,1022,1088,1014,868,871,880,843,816,762,704,641,645,600,650,607,580,648,629,651,672,677,686,785,954,1196,1274,1212,1433,2461,518,72,27,12,13,6,1)
cba_j.values = c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108)
cba_j.count_bases = c(0,763240222,241341069,64347939,18177402,6526168,3101008,1767308,1121785,751664,521618,376307,275787,206878,156554,119712,91495,69664,52645,39174,29112,21424,15993,12171,9405,7207,6041,4976,4206,3648,3209,2818,2696,2445,2304,2062,1997,1868,1753,1730,1782,1673,1686,1722,1638,1669,1624,1634,1533,1512,1485,1351,1275,1263,1250,1106,1125,1081,1009,1053,936,924,866,902,869,836,811,767,753,744,749,758,807,753,802,815,832,892,950,938,879,887,975,943,944,951,861,859,863,760,758,695,781,741,818,799,878,865,743,822,907,1039,1789,493,94,25,10,8,1)
akr.values = c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106)
akr.count_bases = c(0,706935971,201739203,52140243,15612366,6396106,3484264,2267603,1606349,1193196,915587,717154,574843,468593,385359,325086,274633,235833,203953,176055,154423,136507,119905,105659,93709,82151,72367,63047,54930,47338,41542,35571,30294,25962,22520,19094,16303,13960,11647,9760,8440,7294,6062,5248,4330,3585,3073,2793,2471,2332,2051,1999,1829,1771,1706,1697,1596,1493,1362,1344,1225,1115,1162,1152,1191,1158,1113,1100,1024,1043,999,999,1032,1036,1006,1106,1201,1219,1272,1244,1295,1325,1260,1317,1315,1327,1339,1296,1200,1202,1102,1033,864,773,861,940,880,704,761,809,961,1034,2028,365,58,30,1)

a_j.count_bases = a_j.count_bases /sum(a_j.count_bases)
cba_j.count_bases = cba_j.count_bases / sum(cba_j.count_bases)
akr.count_bases = akr.count_bases / sum(akr.count_bases)
plot(a_j.values, a_j.count_bases, type='l', xlab = "Coverage",
        ylab = "Frequency", xlim = c(0,10), main = "DNase hypersensitivity coverage", col = 'blue')


# add blue lines
points(cba_j.values, cba_j.count_bases, type = 'l', col = 'red')
points(akr.values, akr.count_bases, type = 'l', col = 'black')
